</head>
<body>
<div class="f-sep10"></div>
<div class="f-sep10"></div>
<div class="m-hd m-tabs">
  <h2 class="u-tt">{$action_name}html广告</h2>
  <ul id="tabs">
    <li> <a class="z-crt" href="#tab1"><span class="icon">&#xf05a;</span> 基本信息</a></li>
	<li><a href="<?php echo url('admin_list/index',array('cid'=>$catrgory_info['id'])); ?>"><span class="icon">&#xf101;</span> 广告内容列表</a></li>
  </ul>
</div>
<div class="f-sep10"></div>
<div class="m-form">
  <form action="<?php echo url('admin_list/'.$action.'_save'); ?>" method="post" id="form">
    <fieldset>
      <div class="formitm">
        <label class="lab" >广告名称：</label>
        <div class="ipt">
          <input name="title" type="text" class="u-ipt" id="title" value="{$info.title}" datatype="*1-20" errormsg="表单名称至少1~20个字符！" />
          <span class="Validform_checktip">该广告位的描述</span> </div>
      </div>
      <div class="formitm">
        <label class="lab" >广告开始时间：</label>
        <div class="ipt">
<input name="start_time" type="text" class="u-ipt" id="start_time" value="<?php if(!empty($info['start_time'])){ echo date($info['start_time'],'Y-m-d H:i:s'); } ?>" ><span id="start_time_button" class="u-ico f-csp"><span class="icon">&#xf017;</span> 选择</span>
          <span class="Validform_checktip">留空开始时间不限</span> </div>
      </div>
      <div class="formitm">
        <label class="lab" >广告结束时间：</label>
        <div class="ipt">
<input name="stop_time" type="text" class="u-ipt" id="stop_time" value="<?php if(!empty($info['stop_time'])){ echo date($info['stop_time'],'Y-m-d H:i:s'); } ?>" ><span id="stop_time_button" class="u-ico f-csp"><span class="icon">&#xf017;</span> 选择</span>
          <span class="Validform_checktip">留空到期时间不限</span> </div>
      </div>
      <div class="formitm">
        <label class="lab" >广告内容：</label>
        <div class="ipt">
          <textarea class="u-editor" name="content" id="content" datatype="*" errormsg="广告内容不能为空！"  ><?php echo html_in($info['content']); ?></textarea>
        </div>
      </div>
	  <div class="formitm">
        <label class="lab" >备注：</label>
        <div class="ipt">
          <textarea name="remark" class="u-itt" id="remark" >{$info.remark}</textarea>
          <span class="Validform_checktip">备注信息与备用字段</span> </div>
      </div>
	  <div class="formitm">
        <label class="lab" >顺序：</label>
        <div class="ipt">
          <input name="sequence" type="text" class="u-ipt" id="sequence" value="{$info.sequence empty='0'}" datatype="n" errormsg="顺序只能为数字" />
          <span class="Validform_checktip">数字越小越靠前</span> </div>
      </div>
      <div class="formitm formitm-1">
        <button class="u-btn" id="submit" type="submit">保存修改</button>
        <button class="u-btn u-btn-c4" id="reset" type="button">重置</button>
        <span id="tip" class="load"></span> </div>
    </fieldset>
    <input name="file_id" id="file_id" type="hidden" value="{$file_id}" />
    <input name="id" type="hidden" value="{$info.id}" />
    <input name="cid" type="hidden" value="{$catrgory_info.id}" />
	<input name="type" type="hidden" value="{$catrgory_info.type}" />
  </form>
</div>
</body>
<?php echo api('editor','get_editor','content'); ?>
<script>
Do.ready('base','form','calendar','dialog', function() {
	//时间选择
	$('#start_time_button').calendar({ id:'#start_time',format:'yyyy-MM-dd HH:mm:ss'});
	$('#stop_time_button').calendar({ id:'#stop_time',format:'yyyy-MM-dd HH:mm:ss'});
	saveform("<?php echo url('admin_list/index',array('cid'=>$catrgory_info['id'])); ?>");
});
</script>